package cn.icatw.gulimall.product.feign;

import cn.icatw.common.utils.R;
import cn.icatw.gulimall.product.fallback.SeckillFeignServiceFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author icatw
 * @date 2022/4/10
 * @email 762188827@qq.com
 * @apiNote
 */
@FeignClient(value = "gulimall-seckill",fallback = SeckillFeignServiceFallBack.class)
public interface SeckillFeignService {
    /**
     * 得到sku秒杀信息，远程调用秒杀服务
     *
     * @param skuId sku id
     * @return {@link R}
     */
    @GetMapping("/sku/seckill/{skuId}")
    R getSkuSeckillInfo(@PathVariable("skuId") Long skuId);
}
